package com.until;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;


public class Dbutil {
	static String url="jdbc:mysql://localhost:3306/day0307?useUnicode"
			+ "=true&characterEncoding=utf8&serverTimezone"
			+ "=Asia/Shanghai";
static String user="root";
static String pass="123456";	

public static Connection getConn(){
	Connection conn=null;
	try {
		Class.forName("com.mysql.cj.jdbc.Driver");
	
		conn = DriverManager.getConnection(url,user,pass);
	} catch (Exception e) {
		
		e.printStackTrace();
	}
	return conn;
	
}
	public static void main(String[] args){
		System.out.println(Dbutil.getConn());
	}
}
